﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/NewMasterPage2.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="AteneoLibri._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    
    <div class="LandscapeDataVisualization">
<%--        <div class="nav-boxes">

                <a class="orange" href="http://www.ateneolibri.it/">
                    Test
                </a>
                <a class="orange" href="http://www.ateneolibri.it/">
                    Test
                </a>
                <a class="orange" href="http://www.ateneolibri.it/">
                    Test
                </a>
        </div>--%>
        
        <asp:DataList ID="dlBooks" runat="server" BackColor="#FFFFFF" DataKeyField="IdBook"
            RepeatDirection="Horizontal" RepeatColumns="3" EnableViewState="false">
            <HeaderTemplate>
                <h2>
                    Ultimi libri inseriti</h2>
            </HeaderTemplate>
            <ItemTemplate>
                <a class="orange" href='/BookDetails.aspx?IdBook=<%# Eval("IdBook") %>'>
                    <%# Eval("Title") %>
                    <div class="tile-price">
                        <%# Eval("SellingPrice", "{0:C}") %>
                    </div>
                </a>
                
<%--                <div class="BookTileBox">
                    <div class="BookContentBox">
                        <div class="BookIcon">
                            <asp:ImageButton ID="btnDetails" runat="server" CssClass="metroButton" AlternateText="Dettagli"
                                ImageUrl="~/Images/buttons/Next.png" OnClick="btnDetails_Click" CommandArgument='<%# Eval("IdBook") %>' />
                        </div>
                        <div class="BookTitleBox">
                            <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                        </div>
                        <div class="BookPriceBox">
                            <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("SellingPrice", "{0:C}") %>'></asp:Label>
                        </div>
                        <div style="display: block;">
                            Autore/i:
                            <asp:Label ID="lblAuthors" runat="server" Text='<%# Eval("Author") %>'></asp:Label>
                        </div>
                        <div style="display: none;">
                            Venditore:
                            <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                        </div>
                    </div>
                    <div class="BookDateBox">
                        Data inserimento libro:
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("InsertDate", "{0:d}") %>'></asp:Label>
                    </div>--%>
                </div>
            </ItemTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:DataList>
    </div>

    <div class="PortraitDataVisualization">
        <asp:DataList ID="dlBooksPortrait" runat="server" BackColor="#FFFFFF" DataKeyField="IdBook"
            RepeatDirection="Vertical" RepeatColumns="1" EnableViewState="false">
            <HeaderTemplate>
                <h2>
                    Ultimi libri inseriti</h2>
            </HeaderTemplate>
            <ItemTemplate>
                <a class="orange" href='/BookDetails.aspx?IdBook=<%# Eval("IdBook") %>'>
                    <%# Eval("Title") %>
                    <div class="tile-price">
                        <%# Eval("SellingPrice", "{0:C}") %>
                    </div>
                </a>

<%--                <div class="BookTileBox BookTileBoxSmall">
                    <div class="BookContentBox">
                        <div class="BookIcon">
                            <asp:ImageButton ID="btnDetails" runat="server" CssClass="metroButton" AlternateText="Dettagli"
                                ImageUrl="~/Images/buttons/Next.png" OnClick="btnDetails_Click" CommandArgument='<%# Eval("IdBook") %>' />
                        </div>
                        <div class="BookTitleBox">
                            <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                        </div>
                        <div class="BookPriceBox">
                            <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("SellingPrice", "{0:C}") %>'></asp:Label>
                        </div>
                        <div style="display: block;">
                            Autore/i:
                            <asp:Label ID="lblAuthors" runat="server" Text='<%# Eval("Author") %>'></asp:Label>
                        </div>
                        <div style="display: none;">
                            Venditore:
                            <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                        </div>
                    </div>
                    <div class="BookDateBox">
                        Data inserimento libro:
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("InsertDate", "{0:d}") %>'></asp:Label>
                    </div>
                </div>--%>
            </ItemTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:DataList>
    </div>
</asp:Content>
